<template>
  <el-table :data="tableData" style="width: 100%">
    <el-table-column prop="questionId" label="ID" width="80" />
    <el-table-column prop="title" label="Title" width="180" />
    <el-table-column prop="difficulty" label="Difficulty" width="120" />
    <el-table-column prop="timeLimit" label="Time Limit (sec)" width="180" />
    <el-table-column prop="spaceLimit" label="Space Limit (MB)" width="180" />
    <el-table-column prop="content" label="Content"  width="180"/>
<!--    <el-table-column fixed="right" label="Operations" min-width="120">-->
<!--      <template #default="scope">-->
<!--        <el-button link type="primary">Edit</el-button>-->
<!--      </template>-->
<!--    </el-table-column>-->
  </el-table>
</template>

<script lang="ts" setup>
import {ref,onMounted} from "vue";
import axios from "axios";

const tableData = ref([])

const initData = async () => {
  const {data} = await axios.get('http://localhost:8080/question/list' )
  tableData.value = data.data

  console.log(data.data)
}


onMounted(()=>{
  initData()
})
</script>

<style scoped>
</style>
